﻿@model Gman.WebApp.Models.MaterialModel
<script src="../../Scripts/Binding/Material.js" type="text/javascript"></script>
<script type="text/javascript">
    var guid = "@( Model.ID.ToString())";
    var action = "@( Model.Action.ToString())";

    $(document).ready(function () {
        SetupControls();
        //SetupActions();

        $("#AddProveedor").click(function () {
            LoadAddOrEditProveedores(null);
        });


    });

</script>
<table>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Sede</div>
        </td>
        <td style="width: 250px">
            <div>
                @( Html.DropDownListFor(model => model.Material.IDSede, Model.Sedes, new { style = "width: 150px;", propertyname = "Material.IDSede" }))
            </div>
        </td>
        <td style="width: 150px;">
            <div class="editor-label">
                Tipo Material</div>
        </td>
        <td style="width: 450px">
            <div>
                @( Html.DropDownListFor(model => model.Material.TipoMate, Model.Tipo, new { style = "width: 250px;", propertyname = "Material.TipoMate" }))
            </div>
        </td>
    </tr>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Familia</div>
        </td>
        <td style="width: 300px">
            <div>
                @( Html.DropDownListFor(model => model.Material.FamiMate, Model.Femilia, new { style = "width: 250px;", propertyname = "Material.FamiMate" }))
            </div>
        </td>
        <td style="width: 150px;">
            <div class="editor-label">
                Sub Familia</div>
        </td>
        <td style="width: 450px">
            <div>
                @( Html.DropDownListFor(model => model.Material.SubFamiMate, Model.SubFemilia, new { style = "width: 250px;", propertyname = "Material.SubFamiMate" }))
            </div>
        </td>
    </tr>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Categoria</div>
        </td>
        <td style="width: 300px">
            <div>
                @( Html.DropDownListFor(model => model.Material.CatMate, Model.Categoria, new { style = "width: 250px;", propertyname = "Material.CatMate" }))
            </div>
        </td>
        <td style="width: 150px;">
            <div class="editor-label">
                Sub Categoria</div>
        </td>
        <td style="width: 450px">
            <div>
                @( Html.DropDownListFor(model => model.Material.SubCatMate, Model.SubCategoria, new { style = "width: 250px;", propertyname = "Material.SubCatMate" }))
            </div>
        </td>
    </tr>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Material
            </div>
        </td>
        <td colspan="4">
            <div>
                @( Html.TextBoxFor(model => model.Material.DescMate, new { style = "width: 710px;", propertyname = "Material.DescMate" }))
                <img id="btnBuscar" src="../../_Images/Search-icon-16.png" alt="Buscar material"
                    style="cursor: pointer;" />
            </div>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Unidad Medida</div>
        </td>
        <td style="width: 300px">
            <div>
                @( Html.TextBoxFor(model => model.Material.UniMedMate, new { style = "width: 250px;", propertyname = "Material.UniMedMate" }))
            </div>
        </td>
        <td style="width: 150px;">
            <div class="editor-label">
                Saldo ACtual</div>
        </td>
        <td style="width: 450px">
            <div>
                @( Html.TextBoxFor(model => model.Material.SaldActMate, new { style = "width: 250px;", propertyname = "Material.SaldActMate" }))
            </div>
        </td>
    </tr>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Costo Promedio (S/.)</div>
        </td>
        <td style="width: 300px">
            <div>
                @( Html.TextBoxFor(model => model.Material.CostoPromMate, new { style = "width: 250px;", propertyname = "Material.CostoPromMate" }))
            </div>
        </td>
        <td>
            <div class="editor-label">
                Precio Promedio(S/.)</div>
        </td>
        <td style="width: 450px">
            <div>
                @( Html.TextBoxFor(model => model.Material.PrecPromMate, new { style = "width: 250px;", propertyname = "Material.PrecPromMate" }))
            </div>
        </td>
    </tr>
    <tr>
        <td style="width: 150px;">
            <div class="editor-label">
                Stock Minimo</div>
        </td>
        <td style="width: 300px">
            <div>
                @( Html.TextBoxFor(model => model.Material.StckMinMate, new { style = "width: 250px;", propertyname = "Material.StckMinMate" }))
            </div>
        </td>
        <td>
            <div class="editor-label">
                Stock Reposicion</div>
        </td>
        <td style="width: 450px">
            <div>
                @( Html.TextBoxFor(model => model.Material.StckRepoMate, new { style = "width: 250px;", propertyname = "Material.StckRepoMate" }))
            </div>
        </td>
        <td>
            <div style="height: 30px; float: left">
                <input id="AddProveedor" type="submit" value="Proveedores" style="float: right;" />
            </div>
        </td>
    </tr>
</table>
